home *** CD-ROM | disk | FTP | other *** search
- /*
- File: TextEncodingPlugin.h
-
- Contains: Required interface for Text Encoding Converter-Plugins
-
- Version: Technology:
- Release: Universal Interfaces 3.0d3 on Copland DR1
-
- Copyright: © 1984-1996 by Apple Computer, Inc. All rights reserved.
-
- Bugs?: If you find a problem with this file, send the file and version
- information (from above) and the problem description to:
-
- Internet: apple.bugs@applelink.apple.com
- AppleLink: APPLE.BUGS
-
- */
- #ifndef __TEXTENCODINGPLUGIN__
- #define __TEXTENCODINGPLUGIN__
-
- #ifndef __TYPES__
- #include <Types.h>
- #endif
- #ifndef __NAMEREGISTRY__
- #include <NameRegistry.h>
- #endif
- #ifndef __TEXTENCODINGCONVERTER__
- #include <TextEncodingConverter.h>
- #endif
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import on
- #endif
-
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=mac68k
- #endif
-
- /*
- ####################################################################################
- Constructor/Destructor Messages
- ####################################################################################
- */
- typedef OSStatus (*TextEncodingPluginInitPtr)(void );
- /* normal termination*/
- typedef OSStatus (*TextEncodingPluginFreePtr)(void );
- /* error condition termination*/
- typedef OSStatus (*TextEncodingPluginEjectPtr)(void );
- /*
- ####################################################################################
- Control Messages
- ####################################################################################
- */
- typedef OSStatus (*TextEncodingPluginStartIOPtr)(void );
- typedef OSStatus (*TextEncodingPluginHaltIOPtr)(void );
- /*
- ####################################################################################
- Functional Messages
- ####################################################################################
- */
- typedef OSStatus (*TextEncodingPluginCountAvailableTextEncodingsPtr)(ItemCount *numberOfMappings);
- typedef OSStatus (*TextEncodingPluginGetAvailableTextEncodingsPtr)(TextEncoding *availableEncodings, ItemCount maxAvailableEncodings, ItemCount *actualAvailableEncodings);
- typedef OSStatus (*TextEncodingPluginNewEncodingConverterPtr)(EncodingConverterRef *newEncodingConverter, TextEncoding inputEncoding, TextEncoding outputEncoding);
- typedef OSStatus (*TextEncodingPluginDisposeEncodingConverterPtr)(EncodingConverterRef *newEncodingConverter);
- typedef OSStatus (*TextEncodingPluginConvertTextEncodingPtr)(EncodingConverterRef *encodingConverter, Boolean clearContext, BytePtr *inputText, ByteCount *inputLength, BytePtr outputBuffer, ByteCount outputBufferSize, ByteCount *actualOutputLength);
- typedef OSStatus (*TextEncodingPluginExamineTextEncodingPtr)(EncodingConverterRef *newEncodingConverter);
- /*
- ####################################################################################
- Dispatch Table Definition
- ####################################################################################
- */
-
- enum {
- kTextEncodingPluginDispatchTableVersion1 = 0x0001,
- kTextEncodingPluginDispatchTableCurrentVersion = kTextEncodingPluginDispatchTableVersion1
- };
-
- struct TextEncodingPluginDispatchTable {
-
- short version;
- TextEncodingPluginInitPtr PlugInInit;
- TextEncodingPluginFreePtr PlugInFree;
- TextEncodingPluginEjectPtr PlugInEject;
-
- TextEncodingPluginStartIOPtr PlugInStartIO;
- TextEncodingPluginHaltIOPtr PlugInHaltIO;
-
- TextEncodingPluginCountAvailableTextEncodingsPtr PlugInCountAvailableTextEncodings;
- TextEncodingPluginGetAvailableTextEncodingsPtr PlugInGetAvailableTextEncodings;
- TextEncodingPluginNewEncodingConverterPtr PlugInNewEncodingConverter;
- TextEncodingPluginDisposeEncodingConverterPtr PlugInDisposeEncodingConverter;
- TextEncodingPluginConvertTextEncodingPtr PlugInConvertTextEncoding;
- TextEncodingPluginExamineTextEncodingPtr PlugInExamineTextEncoding;
- };
- typedef struct TextEncodingPluginDispatchTable TextEncodingPluginDispatchTable;
-
-
- #if PRAGMA_ALIGN_SUPPORTED
- #pragma options align=reset
- #endif
-
- #if PRAGMA_IMPORT_SUPPORTED
- #pragma import off
- #endif
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif /* __TEXTENCODINGPLUGIN__ */
-
-